package Homework2;

import java.util.Scanner;

public class Homework2_3 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        String str1 = input.nextLine(), str2 = input.nextLine(), str3 = input.nextLine();
        String st;
        if (str1.compareTo(str2) < 0){
            st = str1;
            str1 = str2;
            str2 = st;
        }
        if (str1.compareTo(str3) < 0){
            st = str1;
            str1 = str3;
            str3 = st;
        }
        if (str2.compareTo(str3) < 0){
            st = str2;
            str2 = str3;
            str3 = st;
        }
        System.out.print(str1 + "\n" + str2 + "\n" + str3);

    }
}
